import Vue from 'vue'
import VueRouter from 'vue-router'
import index from "../components/index/index";
Vue.use(VueRouter)

const routes = [
  { //首页
    path: '/',
    name: 'index',
    component:  index,
    children: [
        {
          //搜索
        path: '',
        name: 'shouye',
        component: () => import(/* webpackChunkName: "about" */ '../components/index/shouye')
      },
      /*==============分类======================================================*/
      { //分类
        path: '/category',
        name: 'category',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../components/category/category')
      },
      /*==============消息=======================================================*/
      {  //消息页面
        path: '/message',
        name: 'message',
        component: () => import(/* webpackChunkName: "about" */ '../components/message/message')
      } ,
      {  //我的页面
        path: '/my',
        name: 'my',
        component: () => import(/* webpackChunkName: "about" */ '../components/my/my')
      }

    ]
  },
  {  //搜索
    path: '/search',
    name: 'search',
    component: () => import(/* webpackChunkName: "about" */ '../components/index/search')
  } ,
  {  //搜索详情
    path: '/searchDetails',
    name: 'searchDetails',
    component: () => import(/* webpackChunkName: "about" */ '../components/index/searchDetails.vue')
  } ,
  {  //商品详情
    path: '/shopList',
    name: 'shopList',
    component: () => import(/* webpackChunkName: "about" */ '../components/index/goodsDetails/shopList.vue')
  } ,
  // {  //商品购买
  //   //path: '/search',
  //   //name: 'search',
  //   //component: () => import(/* webpackChunkName: "about" */ '../components/index/searchDetails')
  // } ,
  {  //订单确认
    path: '/confimOrder',
    name: 'confimOrder',
    component: () => import(/* webpackChunkName: "about" */ '../components/index/goodsDetails/confimOrder')
  } ,
  {  //商品评论
    path: '/comment',
    name: 'comment',
    component: () => import(/* webpackChunkName: "about" */ '../components/index/goodsDetails/comment.vue')
  } ,
  {  //拼团状态
    path: '/pintuanStatus',
    name: 'pintuanStatus',
    component: () => import(/* webpackChunkName: "about" */ '../components/index/payPage/pintuanStatus')
  } ,
  {//秒杀页面
    path: '/ProductDetails',
    name: 'ProductDetails',
    component: () => import(/* webpackChunkName: "about" */ '../components/index/seckill/ProductDetails')
  } ,

  {  //秒杀详情
    path: '/father',
    name: 'father',
    component: () => import(/* webpackChunkName: "about" */ '../components/index/seckill/father'),
    children:[
      {
        path: '/all',
        name: 'all',
        component: () => import(/* webpackChunkName: "about" */ '../components/index/seckill/all'),
      },
      {
        path: '/out',
        name: 'out',
        component: () => import(/* webpackChunkName: "about" */ '../components/index/seckill/out'),
      },
      {
        path: '/conduct',
        name: 'conduct',
        component: () => import(/* webpackChunkName: "about" */ '../components/index/seckill/conduct'),
      },
      {
        path: '/soon',
        name: 'soon',
        component: () => import(/* webpackChunkName: "about" */ '../components/index/seckill/soon'),
      },

    ]
  } ,



  {  //物流信息
    path: '/logisticsNews',
    name: 'logisticsNews',
    component: () => import(/* webpackChunkName: "about" */ '../components/message/wuliu/logisticsNews')
  } ,
  {  //物流状态
    path: '/logisticsStatus',
    name: 'logisticsStatus',
    component: () => import(/* webpackChunkName: "about" */ '../components/message/wuliu/logisticsStatus')
  } ,
  /*=================我的========================*/
  {  //我的页面
    path: '/my',
    name: 'my',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/my')
  } ,

  {  //我的收藏
    path: '/collection',
    name: 'collection',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/collection/collect')
  } ,
  {  //登录
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../components/login/login')
  } ,
  {  //登录
    path: '/userInfo',
    name: 'userInfo',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/userInfo')
  } ,
  {  //登录
    path: '/myCoupon',
    name: 'myCoupon',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/myCoupon')
  } ,
  {  //我的订单
    path: '/myorder',
    name: 'myorder',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/order/myorder')
  } ,
  //必备 工具
  {  //我的评价(发布评价)
    path: '/publishcomments',
    name: 'publishcomments',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/myreview/publishcomments')
  } ,
  {  //我的评价(去评价)
    path: '/evaluate',
    name: 'evaluate',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/myreview/evaluate'),
    children: [
      {  //我的评价(发布评价)
        path: '/Allcomments',
        name: 'Allcomments',
        component: () => import(/* webpackChunkName: "about" */ '../views/Allcomments')
      },
      {  //我的评价(发布评价)
        path: '/Tobeevaluated',
        name: 'Tobeevaluated',
        component: () => import(/* webpackChunkName: "about" */ '../views/Tobeevaluated')
      }
    ]
  } ,
  {  //我的地址
    path: '/addressPage',
    name: 'addressPage',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/address/addressPage')
  } ,
  {  //编辑地址
    path: '/addressEdit',
    name: 'addressEdit',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/address/addressEdit')
  } ,
  {  //领卷中心
    path: '/shopping',
    name: 'shopping',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/jfMall/shopping')
  } ,
  {  //退款售后
    path: '/refund',
    name: 'refund',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/refund/refund')
  } ,
  {  //退款售后详情
    path: '/refunds',
    name: 'refunds',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/refund/refunds')
  } ,

  {  //客服
    path: '/customerService',
    name: 'customerService',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/kefu/customerService')
  } ,
  {  //设置界面
    path: '/setup',
    name: 'setup',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/set/setup')
  } ,
  {  //设置界面 常见问题
    path: '/setup_content',
    name: 'setup_content',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/set/setup_content')
  } ,
  {  //设置界面 文章列表
    path: '/setup_content_a',
    name: 'setup_content_a',
    component: () => import(/* webpackChunkName: "about" */ '../components/my/mustTool/set/setup_content_a')
  } ,







]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
